 const baseUrl = "http://192.168.4.20";
 function http({
     url,
     success
 }){
     wx.request({
         url:baseUrl+url,
         data: {},
         header: {'content-type':'application/json'},
         method: 'GET',
         dataType: 'json',
         responseType: 'text',
         success: (res)=>{
             success(res)
         },
         fail: ()=>{},
         complete: ()=>{}
     });
 }

 function getHttpCat({
     success
 }){
     http({
        url:":8000/city",
        success:res=>{
            success(res)
        }
     })
 }
 module.exports={
     getHttpCat,
     http
 }